package com.yf1706.bean;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the comprehensive_question database table.
 * 
 */
@Entity
@Table(name="comprehensive_question")
@NamedQuery(name="ComprehensiveQuestion.findAll", query="SELECT c FROM ComprehensiveQuestion c")
public class ComprehensiveQuestion implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="comprehensive_question_id")
	private int comprehensiveQuestionId;

	private String answer;

	@Temporal(TemporalType.DATE)
	@Column(name="create_date")
	private Date createDate;

	@Column(name="create_people")
	private String createPeople;

	@Column(name="difficulty_level")
	private String difficultyLevel;

	@Column(name="exam_question")
	private String examQuestion;

	@Column(name="in_practice")
	private int inPractice;

	@Column(name="in_test")
	private int inTest;

	@Column(name="knowledge_point")
	private String knowledgePoint;

	@Column(name="knowledge_set")
	private String knowledgeSet;

	private String picture;

	@Column(name="stop_use")
	private int stopUse;

	//bi-directional many-to-one association to QuestionBank
	@ManyToOne
	@JoinColumn(name="qb_id")
	private QuestionBank questionBank;

	//bi-directional many-to-one association to ExamPaperQuestion
	@OneToMany(mappedBy="comprehensiveQuestion")
	private List<ExamPaperQuestion> examPaperQuestions;

	//bi-directional many-to-one association to TestScoreQuestion
	@OneToMany(mappedBy="comprehensiveQuestion")
	private List<TestScoreQuestion> testScoreQuestions;

	public ComprehensiveQuestion() {
	}

	public int getComprehensiveQuestionId() {
		return this.comprehensiveQuestionId;
	}

	public void setComprehensiveQuestionId(int comprehensiveQuestionId) {
		this.comprehensiveQuestionId = comprehensiveQuestionId;
	}

	public String getAnswer() {
		return this.answer;
	}

	public void setAnswer(String answer) {
		this.answer = answer;
	}

	public Date getCreateDate() {
		return this.createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getCreatePeople() {
		return this.createPeople;
	}

	public void setCreatePeople(String createPeople) {
		this.createPeople = createPeople;
	}

	public String getDifficultyLevel() {
		return this.difficultyLevel;
	}

	public void setDifficultyLevel(String difficultyLevel) {
		this.difficultyLevel = difficultyLevel;
	}

	public String getExamQuestion() {
		return this.examQuestion;
	}

	public void setExamQuestion(String examQuestion) {
		this.examQuestion = examQuestion;
	}

	public int getInPractice() {
		return this.inPractice;
	}

	public void setInPractice(int inPractice) {
		this.inPractice = inPractice;
	}

	public int getInTest() {
		return this.inTest;
	}

	public void setInTest(int inTest) {
		this.inTest = inTest;
	}

	public String getKnowledgePoint() {
		return this.knowledgePoint;
	}

	public void setKnowledgePoint(String knowledgePoint) {
		this.knowledgePoint = knowledgePoint;
	}

	public String getKnowledgeSet() {
		return this.knowledgeSet;
	}

	public void setKnowledgeSet(String knowledgeSet) {
		this.knowledgeSet = knowledgeSet;
	}

	public String getPicture() {
		return this.picture;
	}

	public void setPicture(String picture) {
		this.picture = picture;
	}

	public int getStopUse() {
		return this.stopUse;
	}

	public void setStopUse(int stopUse) {
		this.stopUse = stopUse;
	}

	public QuestionBank getQuestionBank() {
		return this.questionBank;
	}

	public void setQuestionBank(QuestionBank questionBank) {
		this.questionBank = questionBank;
	}

	public List<ExamPaperQuestion> getExamPaperQuestions() {
		return this.examPaperQuestions;
	}

	public void setExamPaperQuestions(List<ExamPaperQuestion> examPaperQuestions) {
		this.examPaperQuestions = examPaperQuestions;
	}

	public ExamPaperQuestion addExamPaperQuestion(ExamPaperQuestion examPaperQuestion) {
		getExamPaperQuestions().add(examPaperQuestion);
		examPaperQuestion.setComprehensiveQuestion(this);

		return examPaperQuestion;
	}

	public ExamPaperQuestion removeExamPaperQuestion(ExamPaperQuestion examPaperQuestion) {
		getExamPaperQuestions().remove(examPaperQuestion);
		examPaperQuestion.setComprehensiveQuestion(null);

		return examPaperQuestion;
	}

	public List<TestScoreQuestion> getTestScoreQuestions() {
		return this.testScoreQuestions;
	}

	public void setTestScoreQuestions(List<TestScoreQuestion> testScoreQuestions) {
		this.testScoreQuestions = testScoreQuestions;
	}

	public TestScoreQuestion addTestScoreQuestion(TestScoreQuestion testScoreQuestion) {
		getTestScoreQuestions().add(testScoreQuestion);
		testScoreQuestion.setComprehensiveQuestion(this);

		return testScoreQuestion;
	}

	public TestScoreQuestion removeTestScoreQuestion(TestScoreQuestion testScoreQuestion) {
		getTestScoreQuestions().remove(testScoreQuestion);
		testScoreQuestion.setComprehensiveQuestion(null);

		return testScoreQuestion;
	}

}